package org.dl.gjz.menyj.task.service.expression;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Service;

/**
 * @author
 */
@Service("telCall")
public class TelephoneCallService {
    public long doCall(DelegateExecution execution) {
        System.out.println("开始电话回访");
        String repairMan = (String) execution.getVariable("repairMan");
        System.out.println(repairMan + "评分：");
        return 10;
    }

    // score 是通过 doCall 返回值 写到对应节点配置的 Result Variable
    public void getScore(DelegateExecution execution) {
        System.out.println("查询评分");
        String repairMan = (String) execution.getVariable("repairMan");
        long score = (long) execution.getVariable("score");
        System.out.println("顾客对"+ repairMan + "的评分：" + score);
    }
}
